<template>
<div>

  <div class="chain-link-bar-wrapper">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item>首页</el-breadcrumb-item>
      <el-breadcrumb-item to="/">数据统计</el-breadcrumb-item>
    </el-breadcrumb>  
  </div>

  <el-card class="box-card">
    
    <div slot="header" class="clearfix">
      <h3 class="app-h3 app-margin-v-0">
        数据统计
      </h3>
    </div>

    <div class="app-diliver-10"></div>
    
    <table class="nc-table text-center">
      <tr class="nc-header-bg">
      	<th>统计项</th>
      	<th>总数</th>
      	<th>今日</th>
      	<th>本周</th>
      	<th>本月</th>
      </tr>
      <tr>
      	<td>用户统计</td>
      	<td>{{member.cnt}}</td>
      	<td>{{member.dayCnt}}</td>
      	<td>{{member.weekCnt}}</td>
      	<td>{{member.monthCnt}}</td>
      </tr>
      <tr>
      	<td>商务会员统计</td>
      	<td>{{vip.cnt}}</td>
      	<td>{{vip.dayCnt}}</td>
      	<td>{{vip.weekCnt}}</td>
      	<td>{{vip.monthCnt}}</td>
      </tr>
        <tr>
            <td>企业会员统计</td>
            <td>{{vipCompany.cnt}}</td>
            <td>{{vipCompany.dayCnt}}</td>
            <td>{{vipCompany.weekCnt}}</td>
            <td>{{vipCompany.monthCnt}}</td>
        </tr>
        <tr>
            <td>商协会会员统计</td>
            <td>{{vipUnion.cnt}}</td>
            <td>{{vipUnion.dayCnt}}</td>
            <td>{{vipUnion.weekCnt}}</td>
            <td>{{vipUnion.monthCnt}}</td>
        </tr>
      <tr>
      	<td>采购统计</td>
      	<td>{{procurement.cnt}}</td>
      	<td>{{procurement.dayCnt}}</td>
      	<td>{{procurement.weekCnt}}</td>
      	<td>{{procurement.monthCnt}}</td>
      </tr>
      <tr>
      	<td>招聘统计</td>
      	<td>{{job.cnt}}</td>
      	<td>{{job.dayCnt}}</td>
      	<td>{{job.weekCnt}}</td>
      	<td>{{job.monthCnt}}</td>
      </tr>

    </table>
  </el-card>
</div>
</template>


<script>

  import NcButton from './common/NcButton'
  import SubmitButton from './common/SubmitButton'

  import Api from '../api/Api'
  import HomeApi from '../api/HomeApi'



  export default {
  	components: {
  		NcButton, SubmitButton
  	},
  	data(){
  	  return {
        member: {},
        vip: {},
        vipCompany: {},
        vipUnion: {},
        procurement: {},
        job: {},
  	  }
  	},
  	computed: {
  	  
  	},
  	created(){
      this.getSta();
  	},
  	methods: {
      getSta(){
        HomeApi.sta({}, json => {
          this.member = json.member;
          this.vip = json.vip;
          this.vipCompany = json.vipCompany;
          this.vipUnion = json.vipUnion;
          this.procurement = json.procurement;
          this.job = json.job;
        });
      }
  	}
  }
</script>

